/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gisgraph.components;

/**
 *
 * @author Slawek
 */
public class GISVertex {
    
    private Integer id;
    private boolean isStartPoint;
    private boolean isEndPoint;
    
    public GISVertex(Integer id, boolean isStartPoint, boolean isEndPoint)
    {
        this.id = id;
        this.isStartPoint = isStartPoint;
        this.isEndPoint = isEndPoint;
    }

    public GISVertex(int i) {
        this.id = (Integer) i;
    }
    
    public Integer getId()
    {
        return id;
    }
    
    public boolean getIsStartPoint()
    {
        return isStartPoint;
    }
    
    public boolean getIsEndPoint()
    {
        return isEndPoint;
    }
    
    public void setIsStartPoint(boolean isStartPoint)
    {
        this.isStartPoint = isStartPoint;
    }
    
    public void setIsEndpoint(boolean isEndPoint)
    {
        this.isEndPoint = isEndPoint;
    }
    
    @Override
    public String toString()
    {
        return id.toString();
    }

    @Override
    public boolean equals(Object obj) {

        if (obj.getClass() != GISVertex.class)
        {
            return false;
        }
        
        GISVertex v = (GISVertex)obj;
        
        return this.id == v.getId();
    }
    
}
